import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";

Vue.use(VueRouter);

const routes = [
  //登录
  {
    path: "/",
    name: "Home",
    component: Home,
  },
  // 注册
  {
    path: "/register",
    name: "Register",
    component: () => import("../views/Register.vue"),
  },
  // 选择问卷
  {
    path: "/select",
    name: "Select",
    component: () => import("../views/Select.vue"),
  },
  // 答题
  {
    path: "/question",
    name: "Question",
    component: () => import("../views/Question.vue"),
  },
];

const router = new VueRouter({
  mode: "hash",
  base: process.env.BASE_URL,
  routes,
});

export default router;
